package thread;

public class ThreadDemo {
    public static void main(String[] args) {
        MyThread1 t1 = new MyThread1();
        MyThread2 t2 = new MyThread2();
        MyThread3 t3 = new MyThread3();
        MyThread4 t4 = new MyThread4();
//        启动线程是用start不是run
        t1.start();
        t2.start();
        t3.start();
        t4.start();
    }
}
class MyThread1 extends   Thread{

    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println("喜欢唱跳rap");
        }
    }
}
class MyThread2 extends Thread{
    public void run(){
        for (int i = 0; i < 100; i++) {

            System.out.println("我是练习时长两年半");
        }
    }
}
class MyThread3 extends Thread{
    public void run(){
        for (int i = 0; i < 100; i++) {

            System.out.println("大家好");
        }
    }
}
class MyThread4 extends Thread{
    public void run(){
        for (int i = 0; i < 100; i++) {

            System.out.println("的个人练习生,我叫鸡哥");
        }
    }
}